Part Number Hot Search : 
G24064 HE900 MKP1V120 P1583D OP37CJ S6416 1100H 2B100
Product Description
Full Text Search
 

To Download ATEVK1110A Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  avr32817: getting started with the 32-bit avr uc3 software framework lwip tcp/ip stack features ? tcp/ip suite description ? 32-bit avr ? uc3 lwip port sour ce file architecture ? web, tftp, smtp servers: ? network configuration ? dhcp protocol 1 introduction this document describes the software modules of the atmel ? 32-bit avr uc3 software framework dedicated to the lwip tcp/ip stack and illustrates how to get started with the lwip tcp/ip so ftware in the software framework. this document is written for the software developers in order to ease the development of lwip tcp/ip applicati ons for the 32-bit avr uc3 series. it assumes that readers are familiar with the 32-bit avr uc3 series. 2 overview lightweight tcp/ip stack designed for em bedded systems. the focus of the lwip tcp/ip implementation is to reduce res ource usage while still having a full scale tcp (cf. http://lwip.wikia.com/wiki/lwip_wiki). lwip features: ? ip (internet protocol) including packet fo rwarding over multiple network interfaces ?icmp (internet control message prot ocol) for network maintenance and debugging ? udp (user datagram protocol) including experimental udp-lite extensions ? tcp (transmission control protocol) with congestion control, rtt estimation and fast recovery/fast retransmit ? specialized raw api for enhanced performance ? optional berkeley-alike socket api ? dhcp (dynamic host configuration protocol) ? ppp (point-to-point protocol) ? arp (address resolution protocol) for ethernet note: lwip has been ported on 32-bit avr uc3 with a macb controller. the software framework 1.7 uses version 1.3.2 which includes support of dhcp. 32-bit microcontrollers application note rev. 32147a - avr32-06/10
2 avr32817 32147a - avr32-06/10 3 tcp/ip suite the tcp/ip protocol suite allows systems of all sizes, running different operating systems, to communicate with each other. it forms the basis for what is called the worldwide internet, a wide area networ k (wan) of several million computers. 3.1 tcp/ip suite layers the tcp/ip protocol suite is a combination of different protocols at various layers. tcp/ip is normally considered to be a 4- layer system as shown in figure 3-1. figure 3-1. four layers of tcp/ip protocol suite 3.1.1 application layer the appli cation layer handles the details of a particular application. common tcp/ip applications include: ? telnet for remote login ? browser support for displaying web pages ? file transfer applications ? e-mail applications refer to standard network services as well as communication methods used by various application programs. 3.1.2 transport layer tcp is responsible for a reliable flow of data between two hosts. typically, tcp divides data passed to it from the applicati on into appropriately sized chunks for the network layer below, acknowledging received packets that are sent and retransmits lost packets. since this reliable, flow of data is provided by the transport layer, the application layer above can ignore these details. udp is a much simpler service to the a pplication layer. it sends packets of data called datagrams from one host to the other, but with no guarantee that the datagrams reach the other end. desired reli ability must be added by the application layer. 3.1.3 network layer this l ayer is sometimes called the internet layer. it handles the movements of packets around the network. routing of packets, for example, takes place here. ip (internet protocol) and icmp (internet control message protocol) provides the network layer in the tcp/ip protocol suite.
avr32817 3 32147a - avr32-06/10 3.1.4 link layer data-li nk or network interface layer is anot her common name of this layer. the link layer normally includes the device dr iver in the operating system and the corresponding network interface (card) in the computer. together they handle all the hardware details of physically interfacing with the cable. figure 3-2 shows an example that includes two hosts on a local area network (lan) such as ethernet, using http. figure 3-2. example with protocols involved one side represents the client, and the other the server. the server provides some services to clients, in this case, access to web pages on the server host. each layer has one or more protocols for communicating with its peer at the same layer. one protocol, for example, allows the two tcp layers to communicate, and another protocol lets the two ip layers communicate. the application layer is normally a user-p rocess while the lower three layers are usually implemented an operating system. 3.1.5 port numbers differe nt applications can use tcp or udp at any time. the transport layer protocols store an identifier in the headers they ge nerate to identify the application. tcp and udp store the 16-bit source port number and the 16-bit destination port number in those respective headers. servers have standard port s. every tcp/ip implementation with a ftp server provides that service on tcp port 21. every telnet server is on tcp port 23. services provided by any implementation of tcp/ip have well-known port numbers between 1 and 1023. the well-known ports are managed by the internet assigned numbers authority (iana).
4 avr32817 32147a - avr32-06/10 a client usually does not care what port num ber it uses on its end. all it needs to be certain of is that whatever port number it uses, it must be unique on its host. client port numbers are called ephemeral ports (i.e., short lived). this is because a client typically exists only as long as the user running the client needs its service, while servers typically run as long as the host is up. most tcp/ip implementations allocate ephemeral port numbers between 1024 and 5000. the port numbers above 5000 are intended for other services (those that are not well known across the internet). the combination of an ip address and a port number is called a socket. 3.1.6 encapsulation whe n an application sends data using tcp, t he data is sent down the protocol stack, through each layer, until it is sent as a str eam of bits across the network. each layer adds information to the data by pre-pending headers and adding trailers to the data it receives. figure 3-3 shows this process. figure 3-3. encapsulation of data as it goes down the protocol stack some abbreviations: ? tcp segment: the unit of data that tcp sends to ip. ? ip datagram: the unit of data that ip sends to the network interface. ? frame: the stream of bits that flows across the ethernet. ip (internet protocol) adds an identifier to t he ip header it generates to indicate which layer the data belongs to. ip handles this by storing an 8-bit value in its header called the protocol field. similarly, many different applications can be using tcp or udp at any time. the transport layer protocol st ores an identifier in the header they generate to identify the application. both tcp and udp use 16-bit port numbers to identify applications. the tcp and udp st ore the source port number and the destination port number in their respective headers. the network interface sends and receives frames on behalf of ip, arp, rarp. there must be some form of identification in the ethernet header indicati ng which network layer protocol generates the data. to handle this, there is a 16-bit frame type field in the ethernet header. user data user data 14 20 20 4 data tcp segment ip datagram ethernet frame application data 46 to 1500 bytes tcp header appl. header ethernet trailer application data application ethernet header ip header ip header tcp header tcp header ethernet driver ip tcp http client
avr32817 5 32147a - avr32-06/10 4 source architecture 4.1 low level drivers the uc3 macb controller implements a 10/100 ethernet mac compatible with the ieee 802.3 standard using an address checker, statistics and control registers, receive and transmit blocks, and a dma interface. the address checker recognizes four specif ic 48-bit addresses and contains a 64-bit hash register for matching multicast a nd unicast addresses. it can recognize the broadcast address of every node on the network, copy all frames, and act on an external address match signal. the macb software driver provides an api to get access to the main features of the macb controller. figure 4-1. macb low level drivers  32-bit avr uc3 software framework ?  applications ?  boards ?  components ?  drivers ?  abdac ?  acifb ?  ? ?  macb ?  example ? macb.c ? macb.h 4.2 lwip source and port files lwip is freely available under a bsd-style license in c source code format and can be downloaded from the development homepage*. figure 4-2. lwip source and port files  32-bit avr uc3 software framework ? ? ?  services ?  audio ?  autobaud ?  ? ?  lwip ?  lwip-1.3.2 ?  lwip-port-1.3.2 note: in respect to the lwip original source code, only the last version is supported by the development team. the atmel port is supported by the standard atmel support channels (please refer to the section 10). original source code (not modified by atmel) (*)available on the following link: http://savannah.nongnu.org/projects/lwip this module holds a port of the lwip tcp/ip stack on the avr uc3 freertos port and over the avr uc3 series with a macb controller for the ethernet access.
6 avr32817 32147a - avr32-06/10 4.3 32-bit avr uc3 software framew ork lwip examples the lwip examples implementation uses the 32-bit avr uc3 freertos.org kernel port. freertos.org is a portable, open source, mini real time kernel - a free to download and royalty free rtos that can be used in commercial applications. freertos is licensed under a modified gpl. figure 4-3: 32-bit avr uc3 software framework lwip examples layout  32-bit avr uc3 software framework ? ? ?  services ?  audio ?  autobaud ?  ? ?  freertos ?  demo ?  avr32_uc3 ?  common ?  lwip_avr32_uc3 ?  at32uc3a0512_evk1100 ?  at32uc3a0512_evk1105 ?  network ?  basicsmtp ? basicsmtp.c ? basicsmtp.h ?  basictftp ? basictftp.c ? basictftp.h ?  basicweb ? basicweb.c ? basicweb.h ?  lwip-port ?  partest ? conf_eth.h ? conf_lwip_threads.h ? freertosconfig.h ? lwipopts.h ? main.c ? printf-stdarg.c ?  lwip_avr32_uc3_dhcp ?  at32uc3a0512_evk1100 ?  at32uc3a0512_evk1105 ?  display ?  network ? ethernet.c ? conf_eth.h ? conf_lwip_threads.h ? freertosconfig.h ? lwipopts.h ? main.c ?  license ?  source ?  ? ?  lwip examples of: - smtp server - tftp server - web server example uses the source code under the ? lwip_avr32_uc3 ? folder with the dhcp protocol in addition.
avr32817 7 32147a - avr32-06/10 5 lwip_avr32_uc3 example description 5.1 what it does 5.1.1 smtp server implement a simple smtp server and al low sending an e-mail, without dhcp. 5.1.2 tftp server implement a simplistic tftp server and al low transferring files up to 2048 bytes between client and server. 5.1.3 web server implement a simplistic web server. 5.2 how to configure this application can be customized by changing a few definitions such as the ip address, mac address... note: all definitions are not explained in this section, only those pertinent to this application note. 5.2.1 system 5.2.1.1 src/services/freertos/demo/lwi p_avr32_uc3/fre ert osconfig.h this file contains configuration defines fo r freertos. there are no lwip client related defines in this file. 5.2.1.2 src/services/freertos/demo /lwip_avr32 _uc3/conf_eth.h this header file sets all external configur ations of the ethernet module such as the mac address, server and client ip address. phy: phy is a common abbreviation for the physical layer of the osi model. a phy connects a link layer device (often called a mac) to a physical medium. to enable the reduced media independent interface (rmii), the ethernet_conf_use_rmii_interface need to be set to 1 in con_eth.h file. in case of this define is set to 0, mii interface is consequently enabled.
8 avr32817 32147a - avr32-06/10 mac: table 5-1. mac address: this address must be unique, given values are in hexadecimal. # define value ethernet_conf_ethaddr0 0x00 ethernet_conf_ethaddr1 0x04 ethernet_conf_ethaddr2 0x25 ethernet_conf_ethaddr3 0x40 ethernet_conf_ethaddr4 0x40 ethernet_conf_ethaddr5 0x40 this configuration w ill set mac address to: 00:04:25:40:40:40 ip: table 5-2. board ip address, required if dh cp is not enabled (see lwipopts.h). # define value ethernet_conf_ipaddr0 192 ethernet_conf_ipaddr1 168 ethernet_conf_ipaddr2 0 ethernet_conf_ipaddr4 2 this configuration will set client ip address to: 192.168.0.2 5.2.1.3 src/services/freertos/demo/l wip_avr32 _uc3_dhcp/lwipopts.h table 5-3. lwip 1.3.2 configuration. # define value lwip_dhcp 0: (disable, default value) the client file uses the fixed ip address set in conf_eth.h 5.2.2 project definition definition s used to enable or disable applications for gcc and iar tm compiler are located in the following folders of the software framework: - src/services/freertos/demo/lwip_avr32_uc3/at32uc3a0512_evk110x - src/services/freertos/demo/demo/lw ip_avr32_uc3_dhcp/at 32uc3a0512_evk110x
avr32817 9 32147a - avr32-06/10 5.2.2.1 smtp server table 5-4. smtp definition. defini tion value smtp_used 1: build the application with a simplistic smtp. 0: (default) build the application without smtp. 5.2.2.2 tftp server table 5-5. tftp definition. defini tion value tftp_used 1: (default) build the application with the tftp server. 0: build the application without tftp server. 5.2.2.3 web server table 5-6. http definition. defini tion value http_used 1: (default) build the application with the web server task. connecting to this web server, returns stacks memory status. this is updated every second on a web browser. 0: build the application without web server. 5.2.3 hardware and network connections 5.2.3.1 smtp server if there is an ethernet net work available, t he toolkit can be connected to any ethernet connection or hub belonging to the network. if the pc is connected to a network, there is a strong possibility that the defaul t ip address of the toolkit is outside the range of the network (the addr ess doesn?t belong to the ip subset of the network). if the ethernet network is connected to the internet, this is certain. in this case and if dhcp is disabled, a ne w ip address for the toolkit is required. contact the local network administrator to be assigned a free ip address for the toolkit, then see the section 5.2.1.2 in orde r to modify the ip configuration value.
10 avr32817 32147a - avr32-06/10 5.2.3.2 tftp server the ethernet interface connector is of st andard rj-45 type. plug the ethernet cable directly into the toolkit to connect to the pc. open the microsoft ? windows ? control panel, and select network setting. figure 5-7. windows control panel right click on ?local area connection? and select the properties menu. figure 5-8. properties menu select ?internet protocol (t cp/ip)? and press ?properties?.
avr32817 11 32147a - avr32-06/10 there is a new dialog box, which must be filled. figure 5-9. as defined in the following screen shot. once this is configured, press ok. now configuration is ready. the default server ip address can be changed (see conf_eth.h). 5.2.3.3 web server same as tftp server. 5.3 how to run it 5.3.1 smtp server before starti ng the application, some co nfigurations must be applied to the src/services/freertos/demo/lwip_avr32_u c3/network/basicsmtp.c source file: - smtp server address : contact the local net work administrator to get this address. - mail sender : used in the mail from field, default is sender@domain.com. - mail recipient : used in the rcpt to fi eld, default is receiver@domain.com. - mail content : default is subject: *** spam ***\r\nfrom: \"your name here\" \r\nto: \"your contact here\" \r\n\r\n say what you want here. once all fields are configured, remove the #e rror lines in the basicsmtp.c source file to allow compilation. run the software and press push button 0 (on the ek1100) to send an email. note: the evk1105 evaluation kit has been developed around qtouch ? features, therefore no push button has been implement ed. nevertheless, some gpios are free and can be used in replacement of the push button.
12 avr32817 32147a - avr32-06/10 5.3.2 tftp server: src\services\freertos\demo\lwip_ av r32_uc3\network\basictftp\basictftp.c to view help at the command-line, at the command prompt, type the following: figure 5-10. tftp commands help to put a file onto the tftp server (suppo rted file size < 2048 bytes), on a pc command line, type put "a_file": this will copy a_file from your hard drive to a ram buffer of the demo (see figure 6-7). figure 5-11. put command line example to get a file from the tftp server, on a pc command line, type get "a_file": this will copy a_file from the ram buffer of the application to the pc's hard drive (see figure 6- 8). figure 5-12. get command file example note 1: only one file at a time is supported on this tftp server. this is because the tftp server being a simplistic example, it doe s not use a file system to store files but a predefined ram area of 2048 bytes. note 2: the lan security configur ation may halt the file transfer.
avr32817 13 32147a - avr32-06/10 5.3.3 web server: src\services\freertos\demo\lwip_ av r32_uc3\network\basicweb\basicweb.c launch your favorite web browser. type t he web server example ip address in your browser's address bar. every time a connection is made and data is received, a dynamic page that shows the current freertos.org kernel statistics is generated and returned (see figure 5- 13). the connection is then closed. figure 5-13. basic web server 6 lwip_avr32_uc3_dhcp example description 6.1 what it does same as the simplistic smtp, tftp and web server from lwip_avr32_uc3 example (src\services\freertos\demo\lwip_avr 32_uc3\network\...) with dhcp enabled. 6.2 how to configure 6.2.1 system 6.2.1.1 src/services/freertos/ demo/lwip_avr32_uc3_dhcp/freertosconfig.h same as in l wip_avr32_uc3 example, section 5.2.1.1. 6.2.1.2 src/services/freertos/demo/l wip_avr32 _uc3_dhcp/conf_eth.h phy and mac: same as in lwip_avr32_uc3 ex ample, section 5.2.1.2. ip: as the dhcp is enabled, no ip define from this file is required. the network will automatically provide an available ip address. 6.2.2 project definition same as in l wip_avr32_uc3 example, section 5.2.2.
14 avr32817 32147a - avr32-06/10 6.2.3 hardware and network connections 6.2.3.1 smtp server plug one sid e of the ethernet cable to the t oolkit connector named ?eth? or ?ethernet? and the other side on an ethernet switch, hub or router (not directly to a pc). 6.2.3.2 tftp server same as smtp server. 6.2.3.3 web server same as smtp server. 6.3 how to run it 6.3.1 smtp server: src/services/freertos/demo/lwip_avr32_uc3/network/basicsmtp.c same as the smtp server from lwip _avr32_uc3 example, section 5.3.1. 6.3.2 tftp server: src\services\freertos\demo\lwip_ av r32_uc3\network\basictftp\basictftp.c start up the application and get the ip addres s from the toolkit display in order to use it for the transfer command-line. 6.3.3 web server: src\services\freertos\demo\lwip_ av r32_uc3\network\basicweb\basicweb.c start up the application and get the ip addres s from the toolkit display in order to use it in your browser's address bar. 7 other avr32 uc3 examples using the lwip stack 7.1 evk1100 control panel example the evk1100 control panel application is a demonstration application. its purpose is to log onboard sensors and actuators data and events (data acquisition through adc channels) and make these available through the various connectivity channels supported by the at32uc3a microcontroller series. the logs are accessible locally through u sart or usb (mass storage class), and/or remotely through the internet (web server). evk1110 getting started application related to the control panel example can be found here: http://www.atmel.com/dyn/resources/pro d_documents/evk1100_getting_started.pdf 7.2 ssl server based on polarssl light-weight open source cryptographic, this example allow to the application to exchange messages with a se rver over a tcp/ip connectivity through a secure socket layer connection. application note can be found here: http://www.atmel.com/dyn/resource s/p rod_documents/doc32111.pdf
avr32817 15 32147a - avr32-06/10 source code ?avr32753 .zip? can be found on the atmel 32-bit avr uc3 application note web page: http://www.atmel.com/dyn/produc t s/app_notes_v2.asp?family_id=607 8 frequently asked questions q: i need an example of a web server for the avr32 uc3a0/1 but not using freertos . a: the web servers implemented in the software framework (under applications/evk1100-control- panel/ folder or under services/freertos/demo/lwip_avr32_uc3/ fo lder) are using the lwip tcp/ip stack and freertos. you can find an implementation of the lwip tcp/ip stack without rtos in the wifi stack available under components/wifi/hd/ folder of the software framework package. there is also some words about this subject here: http://lwip.wikia.com/wiki/lwip_wi th_or_without_an _operating_syst em 9 reference lwip source code development home page can be found here: http://savannah.nongnu.org/projects/lwip lwip wikia link: http://lwip.wikia.com/wiki/lwip_wiki lwip from wikipedia: http://en.wikipedia.org/wiki/lwip lwip optimization: http://lwip.wikia.com/wiki/maximizing_throughput freertos homepage: http://www.freertos.org/
16 avr32817 32147a - avr32-06/10 10 support atmel has several support channels available: ? web portal: http://support.atmel.no/ all atmel microcontrollers ? email: avr@atmel.com all avr products ? email: avr32@atmel.com all 32-bit avr products please register on the web portal to gain access to the following services: ? access to a rich faq database ? easy submission of technical support requests ? history of all your past support requests ? register to receive atmel microcontrollers? newsletters
32147a - avr32-06/10 disclaimer headquarters international atmel corporation 2325 orchard parkway san jose, ca 95131 usa tel: 1(408) 441-0311 fax: 1(408) 487-2600 atmel asia unit 1-5 & 16, 19/f bea tower, millennium city 5 418 kwun tong road kwun tong, kowloon hong kong tel: (852) 2245-6100 fax: (852) 2722-1369 product contact atmel europe le krebs 8, rue jean-pierre timbaud bp 309 78054 saint-quentin-en- yvelines cedex france tel: (33) 1-30-60-70-00 fax: (33) 1-30-60-71-11 atmel japan 9f, tonetsu shinkawa bldg. 1-24-8 shinkawa chuo-ku, tokyo 104-0033 japan tel: (81) 3-3523-3551 fax: (81) 3-3523-7581 web site www.atmel.com technical support avr32@atmel.com sales contact www.atmel.com/contacts literature request www.atmel.com/literature disclaimer: the information in this document is pr ovided in connection with atmel products. no lic ense, express or implied, by estoppel or otherwise, to any intellectual property right is grant ed by this document or in connection with the sale of atmel products. except as set forth in atmel?s terms and conditions of sale located on atmel?s web site, atmel assu mes no liability whatsoever and disclaims any express, implied or statutory warranty relating to its products including, but not limited to, the implied warranty of merchantability, fitness for a particular pu rpose, or non-infringement. in no event sha ll atmel be liable for any direct, indirect, consequential, punitive, special or i ncidental damages (including, without limitation, damages for loss of profits, business interruption, or loss of information) arising out of the use or inability to use this document, even if atmel has been advised of the possibility of such damages. atmel makes no representations or warranties with respect to the accuracy or completeness of the contents of this document and rese rves the right to make changes to specifications and product descriptions at any time without notice. atmel does not make any commitment to update the information contained herein. unless specifically provided otherwise, at mel products are not suitable for, and shall not be used in, automotive applications. atme l?s products are not intended, authorized, or wa rranted for use as components in applications inte nded to support or sustain life. ? 2010 atmel corporation. all rights reserved . atmel ? , atmel logo and combinations thereof, avr ? , avr ? logo, qtouch ? and others, are the registered trademarks and others are trademarks of atmel corporation or its subsidiaries. windows ? and others are registered trademarks or trademarks of microsoft ? corporation in the us and/or other countries. other terms and product names may be trademarks of others.


▲Up To Search▲   

 
Price & Availability of ATEVK1110A

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X